package com.jingdianjichi.subject.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
    * ClassName :IsDeletedFlagEnum
    * Package :com.jingdianjichi.subject.common.enums
    * Desciption :
    *@Author :
    *@Create : 15:02
    *@Version :1.0
 *
 */
@AllArgsConstructor
@Getter
public enum IsDeletedFlagEnum {

    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    private Integer code;
    private String desc;


    public static IsDeletedFlagEnum getByCode(int codeVal) {
        for (IsDeletedFlagEnum isDeletedFlagEnum : IsDeletedFlagEnum.values()) {
            if (isDeletedFlagEnum.code == codeVal) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
